package og.jaaksi.test.gridview;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;

/**
 * Created by Fcy on 2016/3/9.
 */
public class GridAdapter extends ArrayAdapter<Integer>
{
	private int info = 0;

	public GridAdapter(Context context)
	{
		this(context, 0);
	}

	public GridAdapter(Context context, int info)
	{
		super(context);
		this.info = info;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent)
	{
		if (info == 0)
		{
			return mInflater.inflate(R.layout.item_grid, parent, false);
		}

		return mInflater.inflate(R.layout.item_gallery, parent, false);
	}
}
